#ifndef _BOX3D_H_
#define _BOX3D_H_

/**
* @file box3d.h
* August 11, 2008
* 
* @brief Defines a three-dimensional box that limits/bounds the geometric object
* 
* @author Antonio Miranda (amiranda@tecgraf.puc-rio.br )
* 
* @see Curve
*/

// includes
//----------


// class definition
//------------------
class Box3D
{
public:
  Box3D();
  ~Box3D();

  /*!
  * @brief updates the bound/limit values of the box.
  * @param _x
  * @param _y
  * @param _z
  */
  void update( double _x,
               double _y,
               double _z );

  /*!
  * @brief gets the bound/limit values of the box.
  * @param _xmn: maximum X coordinate value
  * @param _ymn
  * @param _zmn
  * @param _xmx
  * @param _ymx
  * @param _zmx
  * @return a flag with true or false, if the box is empty
  */
  int get( double& _xmn,
           double& _ymn,
           double& _zmn,
           double& _xmx,
           double& _ymx,
           double& _zmx );

  /*!
  * @brief gets the bound/limit values of the box.
  * @param data: coordinate values
  * @return a flag with true or false, if the box is empty
  */
  int get( double data[6] );

  /*!
  * @brief clear box
  */
  void clear();

  /*!
  * @brief expand box
  */
  void expande (double _factor);

private:
  /** @brief minimum coordinates value of the box */
  double m_xmin, m_ymin, m_zmin;
  /** @brief maximum coordinates value of the box */
  double m_xmax, m_ymax, m_zmax;
  /** @brief if the box is empty */
  bool m_isEmpty;
};


#endif // _BOX3D_H_
